package de.tum.in.eist.im.shared.Message;

import java.io.Serializable;
import java.util.Date;

import de.tum.in.eist.im.shared.User.User;

@SuppressWarnings("serial")
public class Message implements Serializable {
	
	// private variables
	private String messageText;
	private User messageUser;
	private Date messageDate;
	private Long messageChatId;
	
	/**
	 * default constructor
	 */
	public Message () {}
	
	/**
	 * constructor which creates a new message object
	 * @param messageText the text in the message
	 * @param messageUser the user send this message
	 * @param messageDate the date of this message
	 * @param messageChatId the id of the chat channel
	 */
	public Message (String messageText, User messageUser, Date messageDate, Long messageChatId) {
		this.messageText = messageText;
		this.messageUser = messageUser;
		this.messageDate = messageDate;
		this.messageChatId = messageChatId;
	}
	
	/**
	 * return the text of the message
	 * @return the text of the message
	 */
	public String getMessageText() {
		return this.messageText;
	}
	
	/**
	 * return the User of the message
	 * @return the User of the message
	 */
	public User getMessageUser() {
		return this.messageUser;
	}
	
	/**
	 * return the date of the message
	 * @return the date of the message
	 */
	public Date getMessageDate() {
		return this.messageDate;
	}

	/**
	 * return the id of the message
	 * @return the id of the message
	 */
	public Long getMessageChatId() {
		return this.messageChatId;
	}
}
